<!doctype html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue2-03-生命周期</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    body {
        background-color: #222;
        color: snow;
    }
</style>
<body>
<div id="app">
    {{ msg }}
</div>
<script>
    new Vue({
        el: '#app',
        data: {msg: 'Hello Vue2-生命周期！'},
        methods: {},
        mounted() {
            alert('Vue挂载完毕');
        },
    });
</script>
</body>
</html>